#ifndef __VOL_FILEMAPPING_WRAPPER_H__
#define __VOL_FILEMAPPING_WRAPPER_H__

class CFileMapping
{

public:
    CFileMapping();
    ~CFileMapping();

private:
    PVOID m_pvFile;
    HANDLE hFile;
    HANDLE hFileMap;

public:
    BOOL Create(LPCTSTR lpFileName, DWORD dwCreationDisposition, INT64 n64Size, LPCWSTR lpName);
    BOOL Open(LPCTSTR lpName);
    PVOID Read();
    BOOL Write(DWORD dwFileOffset, PVOID pvData, SIZE_T stSize);
    BOOL MapToMemory(INT64 n64FileOffset, SIZE_T stSize);
    BOOL UnMapToMemory();
    BOOL Save(SIZE_T stSize);
    VOID Close();
};

#endif //__VOL_FILEMAPPING_WRAPPER_H__